package com.syn;

public class BTest {
    private static Object object = new Object();

     public synchronized void testMethod() {
        System.out.println("Hello World -synchronized method ");
    }

    public static void main(String[] args) {
        synchronized (object) {
            System.out.println("Hello World -synchronized block ");
        }
    }
}
